package limeirafol.gui.Cadastro;

import javax.swing.ImageIcon;
import lbframework.bean.internalFrame.LBInternalFrame;
import lbframework.bean.mdiFrame.LBMdiFrame;

public class AcessorioCadastroFotoGUI extends LBInternalFrame {

    private AcessorioCadastroGUI parentFrame = null;

    public AcessorioCadastroFotoGUI(LBMdiFrame i_mdiFrame, AcessorioCadastroGUI i_parentFrame) throws Exception {
        super(i_mdiFrame);

        parentFrame = i_parentFrame;


        initComponents();
        centralizarForm();
        this.setSize(836, 653);
        this.setResizable(false);
        //this.setMaximum(true);


        lblFoto.setIcon(new ImageIcon("/LimeiraFol/Imagens/" + parentFrame.oAcessorio.foto));
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblFoto =  new javax.swing.JLabel(new ImageIcon())
        {
            @Override
            public void paintComponent(java.awt.Graphics g) {
                super.paintComponent(g);
                g.drawImage(((ImageIcon)getIcon()).getImage(), 0, 0, getWidth(),                                                       getHeight(), null);
            }
        };

        setTitle("Acessório Cadastro Foto");
        setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/anel.png"))); // NOI18N

        lblFoto.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblFoto, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblFoto, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel lblFoto;
    // End of variables declaration//GEN-END:variables
}
